package com.huage_07.lesson_03;

import java.io.*;

public class CopyJavaDemo {
    public static void main(String[] args)throws IOException {
        //缓冲字符流复制文件
        BufferedReader br = new BufferedReader(new FileReader("class1\\src\\com\\huage_07\\lesson_02\\CopyTxtDemo.java"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("class1\\src\\com\\huage_07\\lesson_03\\Copy.txt"));

        String s;
        while ((s=br.readLine())!=null){
            bw.write(s);
            bw.newLine();
            bw.flush();
        }

        br.close();
        bw.close();
    }
}
